<!--<?php
$sel = $_viewer->plate  ? 'class="area"' : '';
$areaall = !$_viewer->areatype ? 'sel-all-sel' : '';
print <<<EOT
-->
<script src="mode/house/js/second.js"></script>
<script language="Javascript" >
var imgpath = '{$GLOBALS[imgpath]}';
</script>
<div id="main">
		<div class="pw-hbox mt mb">
<form action="{$_viewer->url}" method='POST' name="QUERYS">
			<div id="querys">
				<ul id="query-list" class="cc">
					<li {$sel}><em>[区域]</em>	<a class="sel-all {$areaall}" href="{$_viewer->options[areatype]}">不限</a> 
<!--
EOT;
$sel = '';
foreach ( $_viewer->area as $key=>$value ) {
$sel = ($_viewer->areatype == $key) ? 'class="sel"' : '';
print<<<EOT
-->					
					<a href="{$_viewer->options[areatype]}opt.areatype.{$key}" {$sel}>{$value}</a>
<!--
EOT;
}
$priceall = !$_viewer->pricetype ? 'sel-all-sel' : '';
print<<<EOT
-->					
					
					
					</li>
<!--
EOT;
if($_viewer->plate){
$plateall = !$_viewer->platetype ? 'sel-all-sel' : '';
print<<<EOT
-->					
					<li class="sub-area"><a href="{$_viewer->options[platetype]}" class="sel-all {$plateall}">不限</a> 
<!--
EOT;
$sel = '';
foreach ( $_viewer->plate as $key=>$value ) {
$sel = ($_viewer->platetype == $key) ? 'class="sel"' : '';
print<<<EOT
-->						
					<a href="{$_viewer->options[platetype]}opt.platetype.{$key}" {$sel}>{$value}</a>
<!--
EOT;
}
$priceall = !$_viewer->pricetype ? 'sel-all-sel' : '';
print<<<EOT
-->					
					</li>
<!--
EOT;
}
print<<<EOT
-->	
					<li><em>[售价]</em><a class="sel-all {$priceall}" href="{$_viewer->options[pricetype]}">不限</a> 
<!--
EOT;
$sel = '';
foreach ( $_viewer->price as $key=>$value ) {
$sel = ($_viewer->pricetype == $key) ? 'class="sel"' : '';
print<<<EOT
-->					
					<a href="{$_viewer->options[pricetype]}opt.pricetype.{$key}"  {$sel}>{$value}</a>
<!--
EOT;
}
$acreageall = !$_viewer->acreagetype ? 'sel-all-sel' : '';
print<<<EOT
-->
					
					</li>
					<li><em>[面积]</em><a class="sel-all {$acreageall}" href="{$_viewer->options[acreagetype]}">不限</a>
<!--
EOT;
$sel = '';
foreach ( $_viewer->acreage as  $key=>$value ) {
$sel = ($_viewer->acreagetype == $key) ? 'class="sel"' : '';
print<<<EOT
-->					
					<a href="{$_viewer->options[acreagetype]}opt.acreagetype.{$key}"  {$sel}>{$value}</a>
<!--
EOT;
}
$roomall = !$_viewer->roomtype ? 'sel-all-sel' : '';
print<<<EOT
-->
					</li>
					<li><em>[房型]</em><a class="sel-all {$roomall}" href="{$_viewer->options[roomtype]}">不限</a>
<!--
EOT;
$sel = '';
foreach ( $_viewer->room as $key=>$value ) {
$sel = ($_viewer->roomtype == $key) ? 'class="sel"' : '';
print<<<EOT
-->					
					<a href="{$_viewer->options[roomtype]}opt.roomtype.{$key}" {$sel}>{$value}</a>
<!--
EOT;
}
$houseall = !$_viewer->housetype ? 'sel-all-sel' : '';
print<<<EOT
-->
					
					</li>
					<li><em>[类型]</em><a class="sel-all {$houseall}" href="{$_viewer->options[housetype]}" >不限</a>
<!--
EOT;
$sel = '';
foreach ( $_viewer->house as  $key=>$value ) {
$sel = ($_viewer->housetype == $key) ? 'class="sel"' : '';
print<<<EOT
-->					
					<a href="{$_viewer->options[housetype]}opt.housetype.{$key}" {$sel}>{$value}</a>
<!--
EOT;
}
print<<<EOT
-->
				</li>
				</ul>
			</div>
</form>
		</div>
<!--
EOT;
if(!empty($_viewer->condition)){
print <<<EOT
-->
		<dl id="query-selected" class="pw-hbox">

			<dt>当前找房条件 >></dt>
			<dd class="cc">
<!--
EOT;
foreach ( $_viewer->condition as  $key=>$value ) {
if(!empty($value)){
print<<<EOT
-->
			<a href="{$_viewer->options[$key]}" class="items">{$value}<span class="clear-icon"></span></a>
<!--
EOT;
}
}
print<<<EOT
-->

			<a class="clear-query" href="{$_viewer->url}&act={$_viewer->act}">清空条件</a>
			
			</dd>
		</dl>
<!--
EOT;
}
${$_viewer->act} = 'class = "current"';
print <<<EOT
-->
		<div class="cc mb">
			<div class="w-715 fl">
				<div id="houses" class="pw-hbox">
					<div class="hd">
						<ul class="tab-holder">
							<li $all><a href="{$_viewer->url}&act=all">所有房源</a></li>
							<li $urgent><a href="{$_viewer->url}&act=urgent">急售房源</a></li>
							<li $personal><a href="{$_viewer->url}&act=personal">个人房源</a></li>
						</ul>
					</div>
<!--
EOT;
if($_viewer->total){
print <<<EOT
-->				
					<div class="bd">
					<div class="filter">
							<div class="options">
								<label>排序方式：</label>
								
								<select name="sort-order" onchange="location.href='{$_viewer->options[sort]}opt.sort.'+this.value">
<!--
EOT;
$sel = '';
foreach($_viewer->sortlist as $key=>$value){
$sel = ($_viewer->sort == $key) ? 'selected="true"' : '';
print<<<EOT
-->									
									<option value="{$key}" {$sel}>{$value}</option>
<!--
EOT;
}
print<<<EOT
-->										
								</select>
								
							</div>
						</div>
						<form name="FORM" method="POST" action="{$_viewer->url}">
<!--
EOT;
$styleAdd = $_viewer->isHouseManager ? 'pic-list-manage' : '';
print <<<EOT
-->
						<ul class="list-house pic-list-SH $styleAdd cc">
							</li>				
<!--
EOT;
foreach($_viewer->result as $key=>$value){
$isurgent = !$value[isurgent] ?  'none' : '';
$shop = PW_HouseUrl::shop($value[uid]);
$linkman = $value[isbroker] ?  '<a href="'. $shop .'" target="_blank">'. $value[linkman] .'</a>' : $value[linkman];
$istop= !$value[showTop] ? 'none' : '';
$url = PW_HouseUrl::saleInfo($value['houseid']);
print<<<EOT
-->		
							<li class="item">
								<div class="summary">
									<h3><img src="mode/house/images/sendhand/top.gif" class="icon-img" style="display:{$istop}" />  <a href="$url" target="_blank">{$value[subject]}</a></h3>
									<ul class="attr">
										<li>{$value[village]} {$value[address]}</li>
										<li>户型:{$value[room]}  楼层:{$value[currentfloor]}/{$value[totalfloor]}层  单价:{$value[unitprice]}元/平米</li>
									</ul>
									<p class="time">$linkman {$value[neartime][0]}更新</p>
								</div>
								<span class="lifeLine">
									<img src="mode/house/images/sendhand/lifeline.png" style="display:{$isurgent}" width="45" height="20" alt="急" />								
								</span>
								<span class="info"><span class="price"><em>{$value[price]}</em>万</span><span class="area">{$value[acreage]}平米</span></span>
								<span class="pho">
									<a href="$url"><img src="{$value[thumb]}" width="105" height="80" /></a>
								</span>
<!--
EOT;
if($_viewer->isHouseManager){
print <<<EOT
-->	
								<span class="check"><input type="checkbox" value="{$value[houseid]}" name="houseids[]" /></span>
<!--
EOT;
}
print <<<EOT
-->	
							</li>				
<!--
EOT;
}
print<<<EOT
-->					
							
						</ul>
<!--
EOT;
if($_viewer->isHouseManager){
print <<<EOT
-->	
<div class="list-manage"><span class="check-all"><input type="checkbox" id="check-all" onclick="CheckAll(document.FORM);" name="" value="" /><label for="check-all">全选</label></span>
						<a class="option" href="javascript:;" onclick="setHandler('{$_viewer->url}',document.FORM,'houseids[]','urgent')">加急</a>
						<a class="option" href="javascript:;" onclick="setHandler('{$_viewer->url}',document.FORM,'houseids[]','top')">置顶</a>
						<a class="option" href="javascript:;" onclick="setHandler('{$_viewer->url}',document.FORM,'houseids[]','delete')">删除</a>
						</div>
<!--
EOT;
}
print <<<EOT
-->	
						</form>
					</div>
					<div class="ft">
						<div class="pages">
							{$_viewer->pages}
						</div>
					</div>
<!--
EOT;
}else{
print <<<EOT
-->
	<div id="alert-page">
		<table cellspacing="0" cellpadding="0">
			<tbody><tr>
				<td valign="top"><img src="mode/house/images/sendhand/error.png"></td>
				<td>
					<h2>抱歉，没有找到符合条件的房源！</h2>
					<p>建议您：</p>
					<ul class="pw-hlist">
						<li>请检查您输入的房源特征，地点或小区名是否有误；</li>
						<li>请您重新选择搜索条件；</li>
					</ul>
				</td>
			</tr>
		</tbody></table>
	</div>
<!--
EOT;
}
$manage = PW_HouseUrl::manage();
$broker = PW_HouseUrl::broker();
print <<<EOT
-->
				</div>
			</div>
			<div class="w-235 fr">
				<div class="btns">
					<p><a class="SH-btn SH-btn-putout SH-btn-lang" href="index.php?m=house&q=manage&a=addsale"><i class="sale"></i>发布出售</a></p>
					<p><a class="SH-btn" href="{$broker}" target="_blank"><i class="broker"></i>开通经纪人</a>
					<a class="SH-btn" href="{$manage}" target="_blank"><i class="manage"></i>房源管理</a></p>
				</div>
<!--
EOT;
portalEcho('secondsale');
print <<<EOT
-->

<!-- 广告位 start -->
<!--
EOT;
list($htmlAdvert,$arrAdvert) = pwAdvert('Mode.House.Sale.Left','','','');
if($htmlAdvert){
print <<<EOT
-->

				<div class="mb">$htmlAdvert</div>
<!--
EOT;
}print <<<EOT
-->
<!-- 广告位 end -->

			</div>
		</div>
	</div>
	
<!-- 广告位 start -->
<!--
EOT;
list($htmlAdvert,$arrAdvert) = pwAdvert('Mode.House.Sale.Footer','','','');
if($htmlAdvert){
print <<<EOT
-->
				<div class="mb">$htmlAdvert</div>
<!--
EOT;
}print <<<EOT
-->
<!-- 广告位 end -->
	
<!--
EOT;
?>-->